package com.wujilee.mqdelaytask.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author yishu
 * @since 2024-04-12
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("delay_task")
public class EntityDelayTask extends Model<EntityDelayTask> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 消息体
     */
    @TableField("message")
    private String message;

    /**
     * 执行时间
     */
    @TableField("executeTime")
    private Long executeTime;

    /**
     * 额外参数
     */
    @TableField("param")
    private String param;
    
    /**
     * 是否执行0 否 1 执行中 2 执行成功 3 执行异常
     */
    @TableField("`status`")
    private String status;
    
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
